package com.example.service.impl;

import com.example.entity.po.Classroom;
import com.example.entity.vo.IdClassroom;
import com.example.entity.vo.PlaceClassroom;
import com.example.mapper.ClassroomMapper;
import com.example.service.ClassroomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassroomServiceImpl implements ClassroomService {

    @Autowired
    private ClassroomMapper classroomMapper;

    @Override
    public int addClassroom(Classroom classroom) {
        return classroomMapper.addClassroom(classroom);
    }

    @Override
    public int deleteClassroom(int classroomId) {
        return classroomMapper.deleteClassroom(classroomId);
    }

    @Override
    public List<PlaceClassroom> queryClassroom() {
        return classroomMapper.queryClassroom();
    }

    @Override
    public List<IdClassroom> queryIdClassroom(int placeId) {
        return classroomMapper.queryIdClassroom(placeId);
    }

    @Override
    public List<PlaceClassroom> fuzzyClassroom(String classroomName) {
        return classroomMapper.fuzzyClassroom(classroomName);
    }
}
